/*
 * New editor name:  TDE, the Thomson-Davis Editor.
 * Author:           Frank Davis
 * Date:             June 5, 1991
 *
 * This modification of Douglas Thomson's code is released into the
 * public domain, Frank Davis.  You may distribute it freely.
 *
 * This file defines all functions in editor.
 */

#define   Help                        1
#define   Rturn                       2
#define   NextLine                    3
#define   BegNextLine                 4
#define   LineDown                    5
#define   LineUp                      6
#define   CharRight                   7
#define   CharLeft                    8
#define   PanRight                    9
#define   PanLeft                    10
#define   WordRight                  11
#define   WordLeft                   12
#define   ScreenDown                 13
#define   ScreenUp                   14
#define   EndOfFile                  15
#define   TopOfFile                  16
#define   BotOfScreen                17
#define   TopOfScreen                18
#define   EndOfLine                  19
#define   BegOfLine                  20
#define   JumpToLine                 21
#define   CenterWindow               22
#define   CenterLine                 23
#define   HorizontalScreenRight      24
#define   HorizontalScreenLeft       25
#define   ScrollDnLine               26
#define   ScrollUpLine               27
#define   PanUp                      28
#define   PanDn                      29
#define   ToggleOverWrite            30
#define   ToggleSmartTabs            31
#define   ToggleIndent               32
#define   ToggleWordWrap             33
#define   ToggleCRLF                 34
#define   ToggleTrailing             35
#define   ToggleZ                    36
#define   ToggleEol                  37
#define   ToggleSync                 38
#define   ToggleRuler                39
#define   ToggleTabInflate           40
#define   SetTabs                    41
#define   SetLeftMargin              42
#define   SetRightMargin             43
#define   SetParagraphMargin         44
#define   FormatParagraph            45
#define   FormatText                 46
#define   LeftJustify                47
#define   RightJustify               48
#define   CenterJustify              49
#define   Tab                        50
#define   BackTab                    51
#define   ParenBalance               52
#define   BackSpace                  53
#define   DeleteChar                 54
#define   StreamDeleteChar           55
#define   DeleteLine                 56
#define   DelEndOfLine               57
#define   WordDelete                 58
#define   AddLine                    59
#define   SplitLine                  60
#define   JoinLine                   61
#define   DuplicateLine              62
#define   AbortCommand               63
#define   UndoLine                   64
#define   UndoDelete                 65
#define   ToggleSearchCase           66
#define   FindForward                67
#define   FindBackward               68
#define   RepeatFindForward1         69
#define   RepeatFindForward2         70
#define   RepeatFindBackward1        71
#define   RepeatFindBackward2        72
#define   ReplaceString              73
#define   DefineDiff                 74
#define   RepeatDiff                 75
#define   MarkBox                    76
#define   MarkLine                   77
#define   MarkStream                 78
#define   UnMarkBlock                79
#define   FillBlock                  80
#define   NumberBlock                81
#define   CopyBlock                  82
#define   KopyBlock                  83
#define   MoveBlock                  84
#define   OverlayBlock               85
#define   DeleteBlock                86
#define   SwapBlock                  87
#define   BlockToFile                88
#define   PrintBlock                 89
#define   BlockExpandTabs            90
#define   BlockCompressTabs          91
#define   BlockIndentTabs            92
#define   BlockTrimTrailing          93
#define   BlockUpperCase             94
#define   BlockLowerCase             95
#define   BlockRot13                 96
#define   BlockFixUUE                97
#define   BlockEmailReply            98
#define   BlockStripHiBit            99
#define   SortBoxBlock              100
#define   DateTimeStamp             101
#define   EditFile                  102
#define   DirList                   103
#define   File                      104
#define   Save                      105
#define   SaveAs                    106
#define   SetFileAttributes         107
#define   EditNextFile              108
#define   DefineGrep                109
#define   RepeatGrep                110
#define   RedrawScreen              111
#define   SizeWindow                112
#define   SplitHorizontal           113
#define   SplitVertical             114
#define   NextWindow                115
#define   PreviousWindow            116
#define   ZoomWindow                117
#define   NextHiddenWindow          118
#define   SetMark1                  119
#define   SetMark2                  120
#define   SetMark3                  121
#define   GotoMark1                 122
#define   GotoMark2                 123
#define   GotoMark3                 124
#define   RecordMacro               125
#define   PlayBack                  126
#define   SaveMacro                 127
#define   LoadMacro                 128
#define   ClearAllMacros            129
#define   Pause                     130
#define   Quit                      131
#define   NextDirtyLine             132
#define   PrevDirtyLine             133
#define   FindRegX                  134
#define   RepeatFindRegX            135
#define   RepeatFindRegXBackward    136
#define   DefineRegXGrep            137

#define   TwoCharKey                138

#define   WordWrap                  139


/*
 *  These are not functions.  They redefine the Control code sequence.
 */
#define    _ALT_ESC                   257
#define    _ESC                       258
#define    _SHIFT_ESC                 259
#define    _CNTRL_ESC                 260
#define    _ENTER                     262
#define    _SHIFT_ENTER               263
#define    _CNTRL_ENTER               264
#define    _BACKSPACE                 265
#define    _SHIFT_BACKSPACE           266
#define    _CNTRL_BACKSPACE           267
#define    _TAB                       268
#define    _ALT_BACKSPACE             270
#define    _SHIFT_TAB                 271
#define    _ALT_Q                     272
#define    _ALT_W                     273
#define    _ALT_E                     274
#define    _ALT_R                     275
#define    _ALT_T                     276
#define    _ALT_Y                     277
#define    _ALT_U                     278
#define    _ALT_I                     279
#define    _ALT_O                     280
#define    _ALT_P                     281
#define    _ALT_LBRACKET              282
#define    _ALT_RBRACKET              283
#define    _ALT_ENTER                 284
#define    _GREY_ENTER                285
#define    _ALT_A                     286
#define    _ALT_S                     287
#define    _ALT_D                     288
#define    _ALT_F                     289
#define    _ALT_G                     290
#define    _ALT_H                     291
#define    _ALT_J                     292
#define    _ALT_K                     293
#define    _ALT_L                     294
#define    _ALT_SEMICOLON             295
#define    _ALT_APOSTROPHE            296
#define    _ALT_TILDE                 297
#define    _SHIFT_GREY_ENTER          298
#define    _CNTRL_GREY_ENTER          299
#define    _ALT_Z                     300
#define    _ALT_X                     301
#define    _ALT_C                     302
#define    _ALT_V                     303
#define    _ALT_B                     304
#define    _ALT_N                     305
#define    _ALT_M                     306
#define    _ALT_LESSTHAN              307
#define    _ALT_GREATERTHAN           308
#define    _ALT_QUESTION              309
#define    _F1                        315
#define    _F2                        316
#define    _F3                        317
#define    _F4                        318
#define    _F5                        319
#define    _F6                        320
#define    _F7                        321
#define    _F8                        322
#define    _F9                        323
#define    _F10                       324
#define    _HOME                      327
#define    _UP                        328
#define    _PGUP                      329
#define    _LEFT                      331
#define    _CENTER                    332
#define    _RIGHT                     333
#define    _END                       335
#define    _DOWN                      336
#define    _PGDN                      337
#define    _INS                       338
#define    _DEL                       339
#define    _SHIFT_F1                  340
#define    _SHIFT_F2                  341
#define    _SHIFT_F3                  342
#define    _SHIFT_F4                  343
#define    _SHIFT_F5                  344
#define    _SHIFT_F6                  345
#define    _SHIFT_F7                  346
#define    _SHIFT_F8                  347
#define    _SHIFT_F9                  348
#define    _SHIFT_F10                 349
#define    _CNTRL_F1                  350
#define    _CNTRL_F2                  351
#define    _CNTRL_F3                  352
#define    _CNTRL_F4                  353
#define    _CNTRL_F5                  354
#define    _CNTRL_F6                  355
#define    _CNTRL_F7                  356
#define    _CNTRL_F8                  357
#define    _CNTRL_F9                  358
#define    _CNTRL_F10                 359
#define    _ALT_F1                    360
#define    _ALT_F2                    361
#define    _ALT_F3                    362
#define    _ALT_F4                    363
#define    _ALT_F5                    364
#define    _ALT_F6                    365
#define    _ALT_F7                    366
#define    _ALT_F8                    367
#define    _ALT_F9                    368
#define    _ALT_F10                   369
#define    _CNTRL_LEFT                371
#define    _CNTRL_RIGHT               372
#define    _CNTRL_END                 373
#define    _CNTRL_PGDN                374
#define    _CNTRL_HOME                375
#define    _ALT_1                     376
#define    _ALT_2                     377
#define    _ALT_3                     378
#define    _ALT_4                     379
#define    _ALT_5                     380
#define    _ALT_6                     381
#define    _ALT_7                     382
#define    _ALT_8                     383
#define    _ALT_9                     384
#define    _ALT_0                     385
#define    _ALT_MINUS                 386
#define    _ALT_EQUAL                 387
#define    _CNTRL_PGUP                388
#define    _F11                       389
#define    _F12                       390
#define    _SHIFT_F11                 391
#define    _SHIFT_F12                 392
#define    _CNTRL_F11                 393
#define    _CNTRL_F12                 394
#define    _ALT_F11                   395
#define    _ALT_F12                   396
#define    _CNTRL_UP                  397
#define    _CNTRL_GREY_MINUS          398
#define    _CNTRL_CENTER              399
#define    _CNTRL_GREY_PLUS           400
#define    _CNTRL_DOWN                401
#define    _CNTRL_INS                 402
#define    _CNTRL_DEL                 403
#define    _CNTRL_TAB                 404
#define    _CNTRL_GREY_SLASH          405
#define    _CNTRL_GREY_SPLAT          406
#define    _ALT_GREY_HOME             407
#define    _ALT_GREY_UP               408
#define    _ALT_GREY_PGUP             409
#define    _ALT_GREY_LEFT             411
#define    _ALT_GREY_RIGHT            413
#define    _ALT_GREY_END              415
#define    _ALT_GREY_DOWN             416
#define    _ALT_GREY_PGDN             417
#define    _ALT_GREY_INS              418
#define    _ALT_GREY_DEL              419
#define    _ALT_GREY_SLASH            420
#define    _ALT_TAB                   421
#define    _ALT_GREY_ENTER            422
#define    _GREY_MINUS                423
#define    _GREY_PLUS                 424
#define    _SHIFT_CNTRL_LEFT          426
#define    _SHIFT_CNTRL_RIGHT         427
#define    _CNTRL_AT                  430
#define    _CNTRL_A                   431
#define    _CNTRL_B                   432
#define    _CNTRL_C                   433
#define    _CNTRL_D                   434
#define    _CNTRL_E                   435
#define    _CNTRL_F                   436
#define    _CNTRL_G                   437
#define    _CNTRL_H                   438
#define    _CNTRL_I                   439
#define    _CNTRL_J                   440
#define    _CNTRL_K                   441
#define    _CNTRL_L                   442
#define    _CNTRL_M                   443
#define    _CNTRL_N                   444
#define    _CNTRL_O                   445
#define    _CNTRL_P                   446
#define    _CNTRL_Q                   447
#define    _CNTRL_R                   448
#define    _CNTRL_S                   449
#define    _CNTRL_T                   450
#define    _CNTRL_U                   451
#define    _CNTRL_V                   452
#define    _CNTRL_W                   453
#define    _CNTRL_X                   454
#define    _CNTRL_Y                   455
#define    _CNTRL_Z                   456
#define    _CNTRL_LBRACKET            457
#define    _CNTRL_BACKSLASH           458
#define    _CNTRL_RBRACKET            459
#define    _CNTRL_CIRCUMFLEX          460
#define    _CNTRL_UNDERLINE           461
#define    _SHIFT_ALT_1               462
#define    _SHIFT_ALT_2               463
#define    _SHIFT_ALT_3               464
#define    _SHIFT_ALT_4               465
#define    _SHIFT_ALT_5               466
#define    _SHIFT_ALT_6               467
#define    _SHIFT_ALT_7               468
#define    _SHIFT_ALT_8               469
#define    _SHIFT_ALT_9               470
#define    _SHIFT_ALT_0               471
#define    _SHIFT_ALT_MINUS           472
#define    _SHIFT_ALT_EQUAL           473
#define    _SHIFT_ALT_Q               474
#define    _SHIFT_ALT_W               475
#define    _SHIFT_ALT_E               476
#define    _SHIFT_ALT_R               477
#define    _SHIFT_ALT_T               478
#define    _SHIFT_ALT_Y               479
#define    _SHIFT_ALT_U               480
#define    _SHIFT_ALT_I               481
#define    _SHIFT_ALT_O               482
#define    _SHIFT_ALT_P               483
#define    _SHIFT_ALT_LBRACKET        484
#define    _SHIFT_ALT_RBRACKET        485
#define    _SHIFT_ALT_A               488
#define    _SHIFT_ALT_S               489
#define    _SHIFT_ALT_D               490
#define    _SHIFT_ALT_F               491
#define    _SHIFT_ALT_G               492
#define    _SHIFT_ALT_H               493
#define    _SHIFT_ALT_J               494
#define    _SHIFT_ALT_K               495
#define    _SHIFT_ALT_L               496
#define    _SHIFT_ALT_SEMICOLON       497
#define    _SHIFT_ALT_APOSTROPHE      498
#define    _SHIFT_ALT_TILDE           499
#define    _SHIFT_ALT_Z               502
#define    _SHIFT_ALT_X               503
#define    _SHIFT_ALT_C               504
#define    _SHIFT_ALT_V               505
#define    _SHIFT_ALT_B               506
#define    _SHIFT_ALT_N               507
#define    _SHIFT_ALT_M               508
#define    _SHIFT_ALT_LESSTHAN        509
#define    _SHIFT_ALT_GREATERTHAN     510
#define    _SHIFT_ALT_QUESTION        511
